//
//  FWLoginRegisterController.m
//  BirdLoveSheep
//
//  Created by wwj on 16/3/14.
//  Copyright © 2016年 wwj. All rights reserved.
//

#import "FWLoginRegisterController.h"
#import "FWTopWindownController.h"

@interface FWLoginRegisterController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *leadMargin;

@end

@implementation FWLoginRegisterController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [FWTopWindownController sharedTopWindwonVC].statusBarStyle = UIStatusBarStyleLightContent;
}

- (UIStatusBarStyle)preferredStatusBarStyle{
    return UIStatusBarStyleLightContent;
}

- (IBAction)onClickBack {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (IBAction)onClickRegister:(UIButton *)sender {
    [self.view endEditing:YES];
    if (self.leadMargin.constant == 0) {
        self.leadMargin.constant = -self.view.width;
        sender.selected = YES;
    }else {
        self.leadMargin.constant = 0;
        sender.selected = NO;
    }
    
    
    [UIView animateWithDuration:0.3 animations:^{
        [self.view layoutIfNeeded];
    }];
}
@end
